package com.hmall.search.pojo;

import com.hmall.common.dto.Item;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

@Data
public class ItemDoc {
    private Long id;
    private String name;
    private Long price;
    private String image;
    private String category;
    private String brand;
    private Long sold;
    private Long commentCount;
    private Boolean isAD;

    public ItemDoc(Item item){
        BeanUtils.copyProperties(item,this);

    }

    public ItemDoc() {
    }
}
